<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/common.jspf"%>
<%@ include file="/common/taglibs.jspf"%>
<html lang="en">
<head>
</head>
<body>
	<form id="theform" action="updateRole.json" method="post"
		class="form-horizontal">
		<input type="hidden" name="userId" value="${userInfo.id }" />
		<fieldset>
			<legend>
				<s:message code="common.ui.fieldset.base" />
			</legend>
			<div class="row-fluid">
				<div class="span6">
					<div class="control-group">
						<label class="control-label"><s:message
								code='userInfo.loginId' /></label>
						<div class="controls">
							<input type="text" name="loginId"
								value='<c:out value="${userInfo.loginId }"/>'
								readonly="readonly" />
						</div>
					</div>
				</div>
				<div class="span6">
					<div class="control-group">
						<label class="control-label"><s:message
								code='userInfo.userName' /></label>
						<div class="controls">
							<input type="text" name="userName"
								value='<c:out value="${userInfo.userName }"/>'
								readonly="readonly" />
						</div>
					</div>
				</div>
			</div>
			<div class="row-fluid">
				<div class="span6">
					<div class="control-group">
						<label class="control-label"><s:message
								code='userInfo.nickName' /></label>
						<div class="controls">
							<input type="text" name="nickName"
								value='<c:out value="${userInfo.nickName }"/>'
								readonly="readonly" />
						</div>
					</div>
				</div>
				<div class="span6">
					<div class="control-group">
						<label class="control-label"><s:message
								code='userInfo.gender' /></label>
						<div class="controls">
							<input type="text" name="gender"
								value="${li:genDictContent('0002', userInfo.gender) }"
								readonly="readonly" />
						</div>
					</div>
				</div>
			</div>
		</fieldset>
		<fieldset>
			<legend>
				<s:message code="user.ui.fieldset.belongTo" />
			</legend>
			<table
				class="table table-striped table-bordered table-hover datatable">
				<thead>
					<tr>
						<th class="checkCol">序号</th>
						<th width="30%"><s:message code="tenant.tenantCode" /></th>
						<th><s:message code="tenant.tenantAlias" /></th>
						<th><s:message code="tenant.bagCode" /></th>
						<th><s:message code="tenant.status" /></th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${tenantVoList }" var="row" varStatus="status">
						<tr>
							<td class="checkCol">${status.index+1 }</td>
							<td><c:out value="${row.tenantCode }"></c:out></td>
							<td><c:out value="${row.tenantAlias }"></c:out></td>
							<td><c:out value="${row.bagCode }"></c:out></td>
							<td><s:message code="tenant.status.${row.status }" /></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</fieldset>

		<div class="form-actions" style="text-align: center;">
			<button type="button" class="btn" onclick="history.back();">
				<s:message code="btn.back" />
			</button>
		</div>

	</form>
	<!--page specific plugin scripts-->
	<script type="text/javascript">
		$(document).ready(function(){	
		  
		  var checkboxs = $.webtools.checkboxs({
				checkAll: "#checkAll",
				checkItem: ".checkItem"				
			});
			
			$('#theform').littFormSubmit({
				rules : {					
					roleIds : {
						required : true
					}
				},			
				success: function(reply){
					 location.href = <h:returnUrl value="index.do"></h:returnUrl>;					
				}
			});
		});
		</script>
</body>
</html>